<template>
    <div>
        <p>{{title}}</p>
        <hr>

        <div style="margin: 20px 0;">
            <el-table :data="dataList.list" border style="width: 100%">
                <el-table-column prop="itemCount" label="商品数" width="180"></el-table-column>
                <el-table-column prop="ruleId" label="波次号" width="180"></el-table-column>
                <el-table-column prop="ruleName" label="波次规则" width="180"></el-table-column>
                <el-table-column prop="tradesCount" label="订单数"></el-table-column>
            </el-table>
        </div>

        <le-pages :dataList="dataList" :toClick="getDataList"></le-pages>
    </div>
</template>
/trade/wave/list
<script>
export default {
    data(){
        return {
            title: '模版式组件',
            dataList: {
                list: [],
                page: {
                    pageNo: 1,
                    pageSize: 20
                },
                total: 0
            },
        }
    },
    methods: {
        getDataList(pageNo, pageSize){
            let params = {
                    pageNo: pageNo || 1,
                    pageSize: pageSize || 20
                }

            this.$axios.get('/sget/trade/wave/list', { params }).then(res => {
                if(res.status == 200){
                    this.dataList = res.data;
                }
            }).catch(res => {
                console.log('err')
            })
        }
    },
    mounted(){
        this.getDataList();
    }
}
</script>
